<template>
  <div>
<div class="swiper-container">
    <div class="swiper-wrapper">
        <div class="swiper-slide" v-for="(v,i) in imgarr" :key="i"><img :src="v" alt=""></div>
    </div>
    <!-- 如果需要分页器 -->
    <div class="swiper-pagination"></div>

</div>

  </div>
</template>

<script>
import Swiper from "swiper";
import 'swiper/css/swiper.css'
export default {
  name: "mySwiper",
  props:['imgarr'],
  mounted() {
    new Swiper(".swiper-container", {
      loop: true, // 循环模式选项
      autoplay: true,
      speed:200,
      // 如果需要分页器
      pagination: {
        el: ".swiper-pagination",
      },

    
    });
  },
};
</script>

<style>
</style>